package com.shi.reflection.Demo01;

public class Demo01 {
    public static void main(String[] args) throws ClassNotFoundException {
        /**
         *获取class对象的方式：
         *  1.Class.forName("全类名")
         *  2.类名.class
         *  3.对象.getclass( )
         */

        //1.Class.forName("全类名")
        Class clazz1 = Class.forName("com.shi.reflection.Demo01.Student");

        //2.类名.class
        Class<Student> clazz2 = Student.class;

        //3.对象.getclass( )
        Student stu = new Student();
        Class clazz3 = stu.getClass();


        System.out.println(clazz1);
        System.out.println(clazz2);
        System.out.println(clazz3);

    }
}
